<div class="form">
    <form name="<?php echo $this->_tpl_vars['form']['formcode'] ?>" id="<?php echo $this->_tpl_vars['form']['formcode'] ?>" method="post" action="<?php echo $this->_tpl_vars['form']['action'] ?>"  onSubmit="return <?php echo $this->_tpl_vars['form']['formcode'] ?>form('<?php echo $this->_tpl_vars['form']['isseccode'] ?>')">
        <input type="hidden" name="linkurl" value="add">
        <input type="hidden" name="fgid" id="fgid" value="<?php echo $this->_tpl_vars['form']['fgid'] ?>">
        <input type="hidden" name="formcode" id="formcode" value="<?php echo $this->_tpl_vars['form']['formcode'] ?>">
        <?php if (count($this->_tpl_vars['array'])>0){$divid_i=1;for($i=0;$i<count($this->_tpl_vars['array']); $i++){?>
            <?php if($this->_tpl_vars['array'][$i]['isline']==1){ ?>
                <?php echo $this->_tpl_vars['array'][$i]['typename'] ?> 
            <?php }else{ ?>

            <?php if($this->_tpl_vars['array'][$i]['isvalidate']==1){ ?>*<?php } ?><span style="float: left;width: 120px;text-align: right;"><?php echo $this->_tpl_vars['array'][$i]['typename'] ?>:</span>


            <?php if($this->_tpl_vars['array'][$i]['inputtype']=='string'){ ?>
                <input type="text" name="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>" size="<?php echo $this->_tpl_vars['array'][$i]['attrsize'] ?>" maxlength="<?php echo $this->_tpl_vars['array'][$i]['attrlenther'] ?>" value="<?php echo $this->_tpl_vars['array'][$i]['attrvalue'] ?>" class="input1"/>
                <br />
            <?php } ?>
            <?php if($this->_tpl_vars['array'][$i]['inputtype']=='int'){ ?>
                <input type="text" name="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>]" size="<?php echo $this->_tpl_vars['array'][$i]['attrsize'] ?>" maxlength="<?php echo $this->_tpl_vars['array'][$i]['attrlenther'] ?>" value="<?php echo $this->_tpl_vars['array'][$i]['attrvalue'] ?>" class="input1"/>
                <br />
            <?php } ?>
            <?php if($this->_tpl_vars['array'][$i]['inputtype']=='datetime'){ ?>
                <input type="text" name="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>" size="<?php echo $this->_tpl_vars['array'][$i]['attrsize'] ?>" id="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>" onClick="WdatePicker({el:'<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>',readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" maxlength="<?php echo $this->_tpl_vars['array'][$i]['attrlenther'] ?>" class="input1"/>
                <br />
            <?php } ?>
            <?php if($this->_tpl_vars['array'][$i]['inputtype']=='selectinput'){ ?>
                <input type="text" name="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>" size="<?php echo $this->_tpl_vars['array'][$i]['attrsize'] ?>" id="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>" value="" maxlength="<?php echo $this->_tpl_vars['array'][$i]['attrlenther'] ?>" class="input1"/>
                <br />
                <select size="1" name="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>selectinputvalue" onChange="javascript:$('#<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>').val(this.value)">
                    <option value=""><?php echo $this->_tpl_vars['array'][$i]['typename'] ?></option>
                    <?php if (count($this->_tpl_vars['array'][$i]['selectinputvalue'])>0){$divid_ii=1;for($ii=0;$ii<count($this->_tpl_vars['array'][$i]['selectinputvalue']); $ii++){?>
                    <option value="<?php echo $this->_tpl_vars['array'][$i]['selectinputvalue'][$ii]['name'] ?>"><?php echo $this->_tpl_vars['array'][$i]['selectinputvalue'][$ii]['name'] ?></option>
                    <?php }} ?>
                </select>
                <br />
            <?php } ?>
            <?php if($this->_tpl_vars['array'][$i]['inputtype']=='img'){ ?>
                <input type="text" name="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>" size="<?php echo $this->_tpl_vars['array'][$i]['attrsize'] ?>" value="<?php echo $this->_tpl_vars['array'][$i]['attrvalue'] ?>" class="input1"/><br />
            <?php } ?>
            <?php if($this->_tpl_vars['array'][$i]['inputtype']=='addon'){ ?>
                <input type="text" name="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>" size="<?php echo $this->_tpl_vars['array'][$i]['attrsize'] ?>" value="<?php echo $this->_tpl_vars['array'][$i]['attrvalue'] ?>" class="input1"/><br />
            <?php } ?>
            <?php if($this->_tpl_vars['array'][$i]['inputtype']=='htmltext'){ ?>
                <textarea name="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>" cols="<?php echo $this->_tpl_vars['array'][$i]['attrsize'] ?>" rows="<?php echo $this->_tpl_vars['array'][$i]['attrrow'] ?>" class="input1"><?php echo $this->_tpl_vars['array'][$i]['attrvalue'] ?></textarea>
                <br />
            <?php } ?>
            <?php if($this->_tpl_vars['array'][$i]['inputtype']=='editor'){ ?>
                <textarea name="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>" cols="<?php echo $this->_tpl_vars['array'][$i]['attrsize'] ?>" rows="<?php echo $this->_tpl_vars['array'][$i]['attrrow'] ?>" class="input1"><?php echo $this->_tpl_vars['array'][$i]['attrvalue'] ?></textarea><br />
            <?php } ?>
            <?php if($this->_tpl_vars['array'][$i]['inputtype']=='text'){ ?>
                <textarea name="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>" cols="<?php echo $this->_tpl_vars['array'][$i]['attrsize'] ?>" rows="<?php echo $this->_tpl_vars['array'][$i]['attrrow'] ?>" class="input1"><?php echo $this->_tpl_vars['array'][$i]['attrvalue'] ?></textarea><br />
            <?php } ?>
            <?php if($this->_tpl_vars['array'][$i]['inputtype']=='select'){ ?>
            <select size="1" name="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>">
                <?php if (count($this->_tpl_vars['array'][$i]['attrvalue'])>0){$divid_ii=1;for($ii=0;$ii<count($this->_tpl_vars['array'][$i]['attrvalue']); $ii++){?>
                <option <?php if($this->_tpl_vars['array'][$i]['attrvalue'][$ii]['selected']=='selected'){ ?>selected="selected" <?php } ?>value="<?php echo $this->_tpl_vars['array'][$i]['attrvalue'][$ii]['name'] ?>"><?php echo $this->_tpl_vars['array'][$i]['attrvalue'][$ii]['name'] ?></option>
                <?php }} ?>
            </select><br />
            <?php } ?>
            <?php if($this->_tpl_vars['array'][$i]['inputtype']=='radio'){ ?>
                <?php if (count($this->_tpl_vars['array'][$i]['attrvalue'])>0){$divid_ii=1;for($ii=0;$ii<count($this->_tpl_vars['array'][$i]['attrvalue']); $ii++){?>
                    <input <?php if($this->_tpl_vars['array'][$i]['attrvalue'][$ii]['selected']=='selected'){ ?>checked="checked" <?php } ?>name="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>" type="radio" value="<?php echo $this->_tpl_vars['array'][$i]['attrvalue'][$ii]['name'] ?>" /> <?php echo $this->_tpl_vars['array'][$i]['attrvalue'][$ii]['name'] ?>
                <?php }} ?>
                <br />
            <?php } ?>
            <?php if($this->_tpl_vars['array'][$i]['inputtype']=='checkbox'){ ?>
                <?php if (count($this->_tpl_vars['array'][$i]['attrvalue'])>0){$divid_ii=1;for($ii=0;$ii<count($this->_tpl_vars['array'][$i]['attrvalue']); $ii++){?>
                    <input <?php if($this->_tpl_vars['array'][$i]['attrvalue'][$ii]['selected']=='selected'){ ?>checked="checked" <?php } ?>name="<?php echo $this->_tpl_vars['array'][$i]['attrname'] ?>[]" type="checkbox" value="<?php echo $this->_tpl_vars['array'][$i]['attrvalue'][$ii]['name'] ?>" /> <?php echo $this->_tpl_vars['array'][$i]['attrvalue'][$ii]['name'] ?>
                <?php }} ?>
                <br />
            <?php } ?>
            <?php if($this->_tpl_vars['array'][$i]['typeremark']!=''){ ?>
            <?php } ?>
            <?php } ?>
        <?php }} ?>
        <?php if($this->_tpl_vars['form']['isseccode']==1){ ?>
            <span>Type the code shown</span><input type="text" id="code" name="seccode" class="input1" maxlength="4" size="3" style="text-transform: uppercase;"/><img title="Try a new code" id="<?php echo $this->_tpl_vars['form']['formcode'] ?>seccodesrc" onClick="sessionimg('<?php echo $this->_tpl_vars['form']['formcode'] ?>seccodesrc','<?php echo $this->_tpl_vars['rootdir'] ?>')" src="<?php echo $this->_tpl_vars['seccodelink'] ?>" style="cursor: pointer;" align="absmiddle"/>
        <?php } ?>
        <input type="submit" name="submit" id="<?php echo $this->_tpl_vars['form']['formcode'] ?>botton" value="提交" />
        <input type="reset" name="reset" value="重置"  />
    </form>
</div>
